package org.xiangfei.server.logic;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.xiangfei.server.bean.User;


/** 
* @author feesx@qq.com
* @version 2017年7月9日 下午5:41:30 
* 类说明 
*/
public class UserService {
    //后面通过redis获取
    public static Map<String, User> userMap = new ConcurrentHashMap<String, User>(); 
    
    static {
        User user1 = new User();
        user1.setUserName("xiangfei");
        user1.setUserId("1");
        User user2 = new User();
        user2.setUserName("admin");
        user2.setUserId("2");
        
        userMap.put(user1.getUserId(), user1);
        userMap.put(user2.getUserId(), user2);

    }
    
    
    public static User getUser(String userId) {
        return userMap.get(userId);
    }
    
    
}
 
